package com.hzspace.multipart.config;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.core.JdbcTemplate;

import javax.sql.DataSource;

/**
 * @Author: LiuHao
 * @Descirption:
 * @Date: 2020/3/4_20:25
 */
@Configuration
public class JdbcTemplateConfig {

    @Bean(name = "jtOne")
    public JdbcTemplate jtOne(@Qualifier("dsOne") DataSource dsOne){
        return new JdbcTemplate(dsOne);
    }

    @Bean(name = "jtTwo")
    public JdbcTemplate jtTwo(@Qualifier("dsTwo") DataSource dsTwo){
        return new JdbcTemplate(dsTwo);
    }
}
